import { CDRankCrusadeReward } from "../excel/CDRankCrusadeReward";


/**
 * 扩展-军团boss奖励
 */
export abstract class CERankCrusadeReward {



    /**初始化 */
    public static init(): void {

    }


    /**
     * 获取军团boss奖励
     * @param index 排名
     */
    public static getRankIndexReward(index: number): CDRankCrusadeReward {
        const vs = CDRankCrusadeReward.datas.getValues();
        for (let i = 0, len = vs.length; i < len; i++) {
            const config = vs[i];
            if (index >= config.rankLow && (index <= config.rankUp || -1 === config.rankUp)){
                return config;
            }
        }
        return index >= 0 ? vs[vs.length - 1] : vs[0];
    }
}